<nav class="navbar navbar-default">
  <div class="container">
   
    <div class="navbar-header">
      <img id="logo" src="<?php echo base_url();?>public/img/logo.jpg" />
      <a class="navbar-brand" href="<?php echo site_url(); ?>">付杰的博客</a>
    </div>

    <div class="collapse navbar-collapse navbar-right" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">

      <li> <a href="<?php echo site_url(); ?>">首页</a ></li>
       <?php foreach($catalogs  as $ac) {?>
        <li <?php if($ac->id==$catalog_id){?>) class="active"<?php } ?> >
        <a href="<?php echo site_url("/Article/lists/".$ac->id); ?>"><?php echo $ac->name ?></a></li>
        
       <?php } ?>
      </ul>
      
     
    </div>
  </div>
</nav>